<?php
$this->backyard_view->header();
?>
<tr>
            <td valign="top">
            
              <table width="982" cellspacing="0" cellpadding="0" border="0">
                    <tbody><tr>
                  <td width="20">&nbsp;</td>
                  <td width="925" align="center"><table width="763" cellspacing="0" cellpadding="0" border="0">
                    <tbody><tr>
                      <td width="763" valign="bottom" height="43" background="/images/content2_top.jpg" align="center"></td>
                    </tr>
                    <tr>
                      <td width="763" valign="top" height="22" background="/images/content2_mid.jpg" align="center">
                        <table width="763" cellspacing="0" cellpadding="0" border="0">
                         
                          <tbody><tr>
                            <td width="50">&nbsp;</td>
                            
                            <td><table width="668" cellspacing="0" cellpadding="0" border="0">
                              <tbody><tr>
                                <td width="250" align="left"><label for="select"></label>
                                  <select id="website" class="report_select" name="website">
                                  <?php
                                  foreach ($all_website as $key=>$val) {
                                  	 if(isset($website) && $website == $val){
                                  	 	echo '<option value="'.$val.'" SELECTED>'.$val.'</option>';
                                  	 }else
                                          echo '<option value="'.$val.'">'.$val.'</option>';
                                  }
                                  ?>
                                  </select></td>
                                <td width="65" align="left" class="report_font2">
                                  日期區間:</td>
                                <td align="left">
                                	<input type="text" value="<?php echo isset($start_date) ? $start_date : ( (date('d') == '01')?date('Y-m-01', strtotime('-1month')):date('Y-m-01') )?>" id="report_date_start" class="date-pick" name="start_date" >
									
								</td>
                                <td width="15" align="left">&nbsp;-</td>
                                <td align="left">
                                	<input type="text" value="<?php echo isset($end_date)?$end_date:date('Y-m-d',strtotime('-2day'))?>" id="report_date_end" class="date-pick" name="end_date">
								</td>
                                <td align="center"><input type="button" value="查詢" id="button" name="button" onclick="getWebSiteDetail()" /></td>
                              </tr>
                            </tbody></table>
                            
                            </td>
                          </tr>
                          <tr>
                            <td>&nbsp;</td>
                            <td>
                            	<div class="radio-section">
                            		<input type="radio" name="chart_type" value="click" checked="checked"/>點擊
									<input type="radio" name="chart_type" value="impression"/>曝光
									<input type="radio" name="chart_type" value="income"/>收入
								</div>
                            	<div class="example-content"><div id="dataChart" class="plot" style="width:650px;height:300px;"></div></div>
							</td>
                          </tr>
                          <tr>
                            <td>&nbsp;</td>
                            <td id="detail_table"></td>
                          </tr>
                        </tbody></table>
                        
                      </td>
                    </tr>
                    <tr>
                      <td><img width="763" height="91" src="/images/content2_down.jpg"></td>
                    </tr>
                  </tbody></table></td>
                  
                </tr>
          
              </tbody></table>
             </td>
          </tr>

<?php
$this->backyard_view->footer();
?>